﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using eShop.Model;
using eShop.Business;

public partial class widget_content : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadContent();
        }
    }

    private void LoadContent()
    {
        if (ContentType != null)
        {
            CMS cms = CMSManager.GetCMS((int)ContentType);
            if (cms != null)
            {
                lContent.Text = Server.HtmlDecode(cms.CMSContent);
            }
        }
    }

    public CMSType ContentType { get; set; }
}